package sf.jooq;

import org.jooq.Schema;
import org.jooq.impl.DSL;
import sf.tools.StringUtils;

public class Jooq {
    public static Schema getSchema(String catalog, String schema) {
        if (StringUtils.isNotBlank(schema)) {
            if (catalog == null) {
                return DSL.schema(DSL.name(schema));
            } else {
                return DSL.schema(DSL.name(catalog, schema));
            }
        }
        return null;
    }
}
